package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanhua.dubbo.mappers.AnnouncementMapper;
import com.tanhua.model.domain.Announcement;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: text
 * @Create by: Bms尤桃
 * @Date: 2021/11/8 16:02
 */
@DubboService
public class AnnouncementApiImpl implements AnnouncementApi {
    @Autowired
    private AnnouncementMapper announcementMapper;

    @Override
    public Page selectPage(Integer page, Integer pagesize) {
        LambdaQueryWrapper<Announcement> queryWrapper = new LambdaQueryWrapper<>();
        Page pages = new Page(page,pagesize);
        Page selectPage = announcementMapper.selectPage(pages, queryWrapper);
        return selectPage;
    }
}
